package core.module.playCenter
{
	import flash.events.MouseEvent;
	import flash.geom.Point;
	
	import mx.core.UIComponent;
	import mx.effects.Move;
	import mx.effects.Parallel;
	import mx.effects.Zoom;

	public class SuperCard extends UIComponent
	{
		public var cardID:String = "";
		
		private var active:Boolean = false;
		
		private var _locked:Boolean = false;

		public function get locked():Boolean
		{
			return _locked;
		}

		public function set locked(value:Boolean):void
		{
			_locked = value;
		}

		
		public var clickable:Boolean = false;
		
		public function SuperCard(cardID:String)
		{
			super();
			this.cardID = cardID;
			
			addEventListener(MouseEvent.CLICK,onClick,true,0,true);
		}
		
		private function onClick(e:MouseEvent):void
		{
			if(locked)
			{
				e.stopImmediatePropagation();
				e.stopPropagation();
			}
		}
		
		public function set actived(status:Boolean):void
		{
			if(locked) return;
			active = status;
			y = active?-15:0;
		}
		
		public function get actived():Boolean
		{
			return active;
		}
		
		public function play(p:Point):void
		{
			actived = false;
		}
		
		public function dispose():void
		{
		
		}
	}
}